<template>
  <div class="userCard">
    <el-link :underline="false"
             @click="GoHomePage"
             class="username"
             type="info">{{user.name}}</el-link>
  </div>
</template>

<script>
export default {
  props: {
    user: {
      type: Object,
      required: true
    }
  },
  components: {

  },
  data () {
    return {

    };
  },
  computed: {

  },
  watch: {

  },
  created () {

  },
  mounted () {

  },
  methods: {
    // 跳转至作者主页
    GoHomePage () {
      this.$router.push("/homepage/" + this.user.id)
    }
  },
};
</script>

<style scoped>
.userCard {
  width: 100%;
  margin: 10px 0;
}
.username {
  font-size: 16px;
}
</style>
